<?php
/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
?>
<div id="sidebar">
    <div id="news">
    <h2><? _e('Novinky'); ?></h2>

<?php
query_posts('posts_per_page=3');
global $more;
$more = 0;
$loop = 0;
if (have_posts()) {
    while (have_posts()) {
        $loop++;
        the_post();
        if ($loop < 3) {
            echo '<div class="sidebarPost">';
        } else {
            echo '<div class="sidebarPost noBorder">';
        }
        echo '<div class="image-wrapper">';
        jr_post_image($id);
        echo '</div>';
//        echo '<div class="postHeading">';
//
//        echo '<div class="postTitle">';
        echo '<div class="postTitleWrapper">';
        echo '<span class="postDate">'; the_time('j.n.Y'); echo '</span>';
        echo '<a href="'.get_permalink($id).'" class="postTitle">';
        the_title();
        echo '</a>';
        echo '</div>';
//        echo '</div>';
//        echo '<div class="postDate">';
        
//        echo '</div>';
//        echo '</div>';
        echo '<div class="postExcerpt">';
        the_excerpt();
        echo '</div>';
        //echo '<hr class="divider"/>';
        echo '<div class="clearer"></div>';
        echo'</div>';
//        if ($loop < 3)
//            echo '<hr class="sidebar-delimeter-hr" />';
    }
}
?>
    </div>
    <ul id="dynamicSidebar">
    <?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar() ) {} ?>
</ul>
</div>
